<?php
  require('includes/application_top.php'); 

$listItem = $_GET['listItem'];
$area = $_GET['area'];        
if($listItem){
    foreach ($listItem as $position => $item) :
    	$sql[] = "UPDATE ushop_widgets SET ordering = $position, area = '$area' WHERE id = $item";
    endforeach;
}
print_r ($sql);
foreach($sql as $sql){
    //$conn->execute($sql);
    tep_db_query($sql);
}
?>